//
//  Public.m
//  XMJJ_zml
//
//  Created by 杨何华 on 2025/5/10.
//

#import "XMNetwork+Public.h"

@implementation XMNetwork (Public)
- (void)getRecommendWithUrl:(NSString *)path param:(NSMutableDictionary *)param
                  success:(void (^)(id responseObject))successBlock
                  failure:(void (^)(NSError *error))failureBlock {
    [[XMNetwork shareInstance]postDataWithPath:path parameters:param needToken:NO headers:@{@"tenant-id":@"1"} success:^(id  _Nonnull responseObject) {
          NSDictionary * resultDic = responseObject;
          NSArray * data = [resultDic objectForKey:@"data"];
          successBlock(data);
        } failure:^(NSError * _Nonnull error) {
           NSLog(@"%@",error.description);
            failureBlock(error);
       }];
}
@end
